﻿/// <reference path="../../Ext-4.1.1a/ext.js" />

//自定义的主页控件
Ext.define('WeCompany.view.Viewport', {
    extend: 'Ext.container.Viewport',
    layout: {
        type: 'vbox',
        align: 'stretch'
    },
    requires: ['WeCompany.view.MainPanel'],

    layout: {
        type: 'vbox',
        align: 'stretch'
    },

    initComponent: function () {
        var me = this;

        me.items = [{
            xtype: 'toolbar',
            height: 50,
            id: 'North',
            items: [{
                xtype: 'component',
                cls: 'logo',
                html: '简单的CMS后台管理系统'
            }, "->", {
                iconCls: "logout",
                tooltip: "退出",
                scale: "large",
                handler: function () {
                    window.location = "Account/Logout";
                }
            }]
        }, {
            xtype:'mainpanel',
            id:'mainPanel'
        }, {
            xtype: 'component',
            height: 30,
            id: 'South'
        }];

        me.callParent(arguments);
    }
});